package com.wx.fresh.user.api;

import com.wx.fresh.common.util.CommonResult;
import com.wx.fresh.user.dto.CustomLoginDto;
import com.wx.fresh.user.dto.CustomLoginOutDto;
import com.wx.fresh.user.dto.CustomRegisterDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author Dshzs月
 * @version 1.0.0
 * @ClassName LoginFeignClient.java
 * @Description TODO
 * @createTime 2022年04月27日 18:30:00
 */

@Primary
@FeignClient(value = "user-server-core-biz", path = "/login")
public interface LoginFeignClient {

    @RequestMapping(value = "registerUser",method = RequestMethod.POST,consumes = "application/json")
    int registerUser(@RequestBody CustomRegisterDto customRegisterDto);

    @RequestMapping(value = "customLogin",method = RequestMethod.POST)
    CommonResult<CustomLoginOutDto> customLogin(@RequestBody CustomLoginDto customLoginDto);
}
